package com.csj.DesignPattern.singleton.demo1;

//静态变量创建对象
//饿汉式:在类加载时创建对象
public class Singleton {

    private Singleton() {
    }

    private static Singleton instance = new Singleton();

    public static Singleton getInstance() {
        return instance;
    }
}
